home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
basic
/
apbsu106.zip
/
START.ASI
< prev
next >
Wrap
Text File
|
1992-01-29
|
19KB
|
915 lines
start:
rem This version of START.COM is for the ApBASIC 1.7 Support Disk.
rem It requires approximately 68K of available RAM.
rem First, initialize the Esc key. This is necessary when using parameters,
rem because the menus are bypassed at first, which is where the Esc key would
rem otherwise be itialized.
b$=chr$(27)
rem Next, initialize the space bar.
e$=chr$(32)
rem Here is the routine for reading parameters from the DOS prompt.
a$=command$
if a$=" /?" then help:
if a$=" /v" then listfile:
if a$=" /V" then listfile:
if a$=" /r" then readfile:
if a$=" /R" then readfile:
if a$=" /p" then printdoc:
if a$=" /P" then printdoc:
if a$=" /d" then donation:
if a$=" /D" then donation:
if a$=" /40" then option40:
if a$=" /40 ?" then help40:
if a$=" /40 v" then listfl40:
if a$=" /40 V" then listfl40:
if a$=" /40 r" then rdfile40:
if a$=" /40 R" then rdfile40:
if a$=" /40 p" then prfile40:
if a$=" /40 P" then prfile40:
if a$=" /40 d" then donate40:
if a$=" /40 D" then donate40:
rem If no parameters, begin from the beginning.
cls
print " The ApBASIC 1.7 Support Disk 1.00"
print
print
print " by Matt Roberts"
print " 3 Cedar St., # 8"
print " Montpelier, Vt 05602-3006"
print " (802)223-2553"
print
print
print "If you have trouble using this disk, and the documentation doesn't"
print "seem to help, you can call between 9AM and 9PM EST, and I'll try to"
print "help. Keep trying."
print
print
print "If you find the files on this disk useful, a donation of $5.00 would"
print "be greatly appreciated."
print
print "Of course, if there's work by other authors on the disk, the $5.00"
print "doesn't cover them. Thanks for your understanding."
print
print
print "Press any key to continue. ";
gosub continue:
options:
cls
print "You have the following options:"
print
print
print "F1- View a list of the files on this disk."
print
print "F2- View the text file of your choice, on the screen."
print
print "F3- Print the text file of your choice."
print
print "F4- Shell to DOS."
print
print "F5- Change to 40-column mode (larger text; probably most useful for"
print "the visually impaired)."
print
print "F6- See a list of the parameters you can use from the DOS prompt."
print
print "Esc- Return to DOS."
print
print
print "Please press the key corresponding to your choice. ";
wait1:
gosub continue:
if a$=b$ then finish:
if extended=1 then readext:
goto wait1:
rem This routine reads the keyboard, accepting only F1-F6 and the Esc key as
rem valid inputs.
readext:
if a$=";" then listfile:
if a$="<" then readfile:
if a$="=" then printdoc:
if a$=">" then shell:
if a$="?" then option40:
if a$="@" then help:
goto wait1:
rem Here is the routine for seeing a list of the files on this disk.
listfile:
cls
print "Here are the files on this disk:"
print
print
print "DARKSCRN.BAS- The ApBASIC 1.7 source code for DARKSCRN.EXE."
print
print "DARKSCRN.EXE- A screen blanker, used from the DOS prompt."
print
print "DISPLAY.BAS- An ApBASIC module to display text files on the screen."
print
print "FILE-MAN.BAS- The ApBASIC 1.7 source code for FILE-MAN.EXE."
print
print "FILE-MAN.DOC- The documentation for FILE-MAN.EXE."
print
print "FILE-MAN.EXE- The ApBASIC 1.7 File Manager."
print
print "LIST.COM- A neat utility by Vern Buerg; displays files on the screen."
print
print "LOOSWARE.DOC- Notes on the looseware concept."
print
print
print "Press any key to continue. ";
gosub continue:
cls
print "START.ASI- The ASIC source code for START.COM."
print
print "START.COM- The file you're using right now."
print
print
print "Press any key to return to the Main Options Menu. ";
gosub continue:
goto options:
rem Here is the routine for viewing text files on the screen.
readfile:
cls
print "To move forward in the file(s) you are about to view, press PgDn."
print
print "To move back, press PgUp."
print
print "To exit the file, press Esc."
print
print
print "Press any key to see the menu of files."
gosub continue:
readmenu:
cls
print "Here are the files you can view:"
print
print
print "A- DARKSCRN.BAS"
print
print "B- DISPLAY.BAS"
print
print "C- FILE-MAN.BAS"
print
print "D- FILE-MAN.DOC"
print
print "E- NOT IN USE"
print
print "F- LOOSWARE.DOC"
print
print "G- START.ASI"
print
print "Esc- Return to the Main Options Menu."
print
print
print "Please press the key corresponding to your choice. ";
gosub continue:
if a$=b$ then options:
print a$;
if a$="g" then readstar:
if a$="G" then readstar:
if a$="f" then readloos:
if a$="F" then readloos:
if a$="e" then readmenu:
if a$="E" then readmenu:
if a$="d" then readfild:
if a$="D" then readfild:
if a$="c" then readfilb:
if a$="C" then readfilb:
if a$="b" then readdisb:
if a$="B" then readdisb:
if a$="a" then readdarb:
if a$="A" then readdarb:
goto readmenu:
readdarb:
call ("list.com"," darkscrn.bas")
goto readmenu:
readdisb:
call ("list.com"," display.bas")
goto readmenu:
readfilb:
call ("list.com"," file-man.bas")
goto readmenu:
readfild:
call ("list.com"," file-man.doc")
goto readmenu:
readloos:
call ("list.com"," loosware.doc")
goto readmenu:
readstar:
call ("list.com"," start.asi")
goto readmenu:
rem Here is the routine for printing text files.
printdoc:
cls
print "Please ready your printer; press any key to see the menu of files. ";
gosub continue:
printmen:
cls
print "Here are the files you can print:"
print
print
print "A- DARKSCRN.BAS"
print
print "B- DISPLAY.BAS"
print
print "C- FILE-MAN.BAS"
print
print "D- FILE-MAN.DOC"
print
print "E- NOT IN USE"
print
print "F- LOOSWARE.DOC"
print
print "G- START.ASI"
print
print "Esc- Return to the Main Options Menu."
print
print
print "Please press the key corresponding to your choice. ";
wait5:
gosub continue:
if a$=b$ then options:
if a$="g" then printsta:
if a$="G" then printsta:
if a$="f" then printloo:
if a$="F" then printloo:
if a$="e" then printmen:
if a$="E" then printmen:
if a$="d" then printfid:
if a$="D" then printfid:
if a$="c" then printfib:
if a$="C" then printfib:
if a$="b" then printdib:
if a$="B" then printdib:
if a$="a" then printdab:
if a$="A" then printdab:
goto wait5:
printdab:
file$="darkscrn.bas"
gosub printfil:
goto printmen:
printdib:
file$="display.bas"
gosub printfil:
goto printmen:
printfib:
file$="file-man.bas"
gosub printfil:
goto printmen:
printfid:
file$="file-man.doc"
gosub printfil:
goto printmen:
printloo:
file$="loosware.doc"
gosub printfil:
goto printmen:
printsta:
file$="start.asi"
gosub printfil:
goto printmen:
rem Here is the routine for printing a file.
printfil:
cls
f$=chr$(12)
open "i",1,file$
if error=2 then
print ""
print ""
print "File not found."
print
print
print "Press any key to continue. ";
gosub continue:
close 1
return
endif
heading:
cls
print "Printing...";
realfile$=ucase$(file$)
color 0,7
print realfile$
color 7,0
print
print
print "Press space bar to pause printing, or Esc to quit."
print
print
printmor:
input# 1, line$ crlf
if error=96 then
lprint line$
goto blanklin:
endif
contlprn:
lprint line$
a$=inkey$
if a$=b$ then
print "Printing has been terminated. The printer may still have data in its"
print "buffer. If so, it will continue printing until the buffer is empty."
print
lprint f$
close 1
file$=""
print "Press any key to continue. ";
gosub continue:
return
endif
if a$=e$ then pause: else nopause:
pause:
print "Press any key to resume printing. ";
pausemor:
a$=inkey$
if a$="" then pausemor:
a$=""
goto heading:
nopause:
if error=99 then eofp:
goto printmor:
blanklin:
input# 1, line$ crlf
if line$="" then printmor: else contlprn:
eofp:
lprint line$
print "Finished."
print
close 1
lprint f$
print "Press any key to continue. ";
gosub continue:
return
rem This is the end of the routi